package com.tanxiaoyao.wecon.ui;

import com.tanxiaoyao.wecon.R;
import com.tanxiaoyao.wecon.app.AppManager;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class ActivitySimulate extends Activity {

	//控件
	private Button btnOpenHandle;
	private Button btnOpenGravityHandle;
	
	
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		setContentView(R.layout.activity_simulate);
		//初始化控件
		btnOpenHandle = (Button) findViewById(R.id.btn_open_handle);
		btnOpenHandle.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				//跳转手柄界面
				Intent handleIntent = new Intent();
				handleIntent.setClass(ActivitySimulate.this, ActivityHandle.class);
				startActivity(handleIntent);
			}
		});
		btnOpenGravityHandle = (Button) findViewById(R.id.btn_open_gravity_handle);
		btnOpenGravityHandle.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				//跳转重力手柄界面
				Intent gravityHandleIntent = new Intent();
				gravityHandleIntent.setClass(ActivitySimulate.this, ActivityGravityHandle.class);
				startActivity(gravityHandleIntent);
			}
		});
		// 得到标题栏View对象
		View simulate_header = findViewById(R.id.no_btn_header);
		// 设置标题栏文字
		TextView simulate_header_title = (TextView) findViewById(R.id.no_btn_header_title);
		simulate_header_title.setText(R.string.simulate_play);
		super.onCreate(savedInstanceState);
//      Activity压栈
      AppManager.getAppManager().addActivity(this);
	}

	
}
